package cn.well.cloud.quartz.modular.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 定时任务运行日志
 * </p>
 *
 * @author jiawei
 * @since 2020-02-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_timetask_log")
@ApiModel(value="TimetaskLog对象", description="定时任务运行日志")
public class TimetaskLog extends Model<TimetaskLog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "task_log_id", type = IdType.ID_WORKER)
    private Long taskLogId;

    @ApiModelProperty(value = "任务id")
    @TableField("job_id")
    private Long jobId;

    @ApiModelProperty(value = "状态")
    @TableField("state")
    private String state;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "原因")
    @TableField("reason")
    private String reason;


    @Override
    protected Serializable pkVal() {
        return this.taskLogId;
    }

}
